package com.eaoa.vo.bus.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the bus_cargo table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="bus_cargo"
 */

public abstract class BaseBusCargo  implements Serializable {

	public static String REF = "BusCargo";
	public static String PROP_CARGONO = "cargono";
	public static String PROP_WEIGHT = "weight";
	public static String PROP_NUMBER = "number";
	public static String PROP_LENGTH = "length";
	public static String PROP_CARGONAME = "cargoname";
	public static String PROP_PACKAGETYPE = "packagetype";
	public static String PROP_BUS_ORDER = "busOrder";
	public static String PROP_WIDTH = "width";
	public static String PROP_HIGH = "high";
	public static String PROP_SIZE = "size";


	// constructors
	public BaseBusCargo () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBusCargo (java.lang.Long cargono) {
		this.setCargono(cargono);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBusCargo (
		java.lang.Long cargono,
		com.eaoa.vo.bus.BusOrder busOrder) {

		this.setCargono(cargono);
		this.setBusOrder(busOrder);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long cargono;

	// fields
	private java.lang.String cargoname;
	private java.lang.String packagetype;
	private java.lang.Long number;
	private java.math.BigDecimal weight;
	private java.math.BigDecimal length;
	private java.math.BigDecimal width;
	private java.math.BigDecimal high;
	private java.math.BigDecimal size;

	// many to one
	private com.eaoa.vo.bus.BusOrder busOrder;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="cargono"
     */
	public java.lang.Long getCargono () {
		return cargono;
	}

	/**
	 * Set the unique identifier of this class
	 * @param cargono the new ID
	 */
	public void setCargono (java.lang.Long cargono) {
		this.cargono = cargono;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: cargoname
	 */
	public java.lang.String getCargoname () {
		return cargoname;
	}

	/**
	 * Set the value related to the column: cargoname
	 * @param cargoname the cargoname value
	 */
	public void setCargoname (java.lang.String cargoname) {
		this.cargoname = cargoname;
	}



	/**
	 * Return the value associated with the column: packagetype
	 */
	public java.lang.String getPackagetype () {
		return packagetype;
	}

	/**
	 * Set the value related to the column: packagetype
	 * @param packagetype the packagetype value
	 */
	public void setPackagetype (java.lang.String packagetype) {
		this.packagetype = packagetype;
	}



	/**
	 * Return the value associated with the column: number
	 */
	public java.lang.Long getNumber () {
		return number;
	}

	/**
	 * Set the value related to the column: number
	 * @param number the number value
	 */
	public void setNumber (java.lang.Long number) {
		this.number = number;
	}



	/**
	 * Return the value associated with the column: weight
	 */
	public java.math.BigDecimal getWeight () {
		return weight;
	}

	/**
	 * Set the value related to the column: weight
	 * @param weight the weight value
	 */
	public void setWeight (java.math.BigDecimal weight) {
		this.weight = weight;
	}



	/**
	 * Return the value associated with the column: length
	 */
	public java.math.BigDecimal getLength () {
		return length;
	}

	/**
	 * Set the value related to the column: length
	 * @param length the length value
	 */
	public void setLength (java.math.BigDecimal length) {
		this.length = length;
	}



	/**
	 * Return the value associated with the column: width
	 */
	public java.math.BigDecimal getWidth () {
		return width;
	}

	/**
	 * Set the value related to the column: width
	 * @param width the width value
	 */
	public void setWidth (java.math.BigDecimal width) {
		this.width = width;
	}



	/**
	 * Return the value associated with the column: high
	 */
	public java.math.BigDecimal getHigh () {
		return high;
	}

	/**
	 * Set the value related to the column: high
	 * @param high the high value
	 */
	public void setHigh (java.math.BigDecimal high) {
		this.high = high;
	}



	/**
	 * Return the value associated with the column: size
	 */
	public java.math.BigDecimal getSize () {
		return size;
	}

	/**
	 * Set the value related to the column: size
	 * @param size the size value
	 */
	public void setSize (java.math.BigDecimal size) {
		this.size = size;
	}



	/**
	 * Return the value associated with the column: orderno
	 */
	public com.eaoa.vo.bus.BusOrder getBusOrder () {
		return busOrder;
	}

	/**
	 * Set the value related to the column: orderno
	 * @param busOrder the orderno value
	 */
	public void setBusOrder (com.eaoa.vo.bus.BusOrder busOrder) {
		this.busOrder = busOrder;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.eaoa.vo.bus.BusCargo)) return false;
		else {
			com.eaoa.vo.bus.BusCargo busCargo = (com.eaoa.vo.bus.BusCargo) obj;
			if (null == this.getCargono() || null == busCargo.getCargono()) return false;
			else return (this.getCargono().equals(busCargo.getCargono()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getCargono()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getCargono().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}